home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / prg_gen / euphor14.zip / ASCII.EX < prev    next >
Text File  |  1996-02-23  |  773b  |  44 lines

  1.     -- Display ASCII / code page chart
  2.     -- in 50 lines-per-screen mode  
  3.  
  4. include graphics.e
  5.  
  6. constant SCREEN = 1
  7.  
  8. if text_rows(50) then
  9. end if
  10.  
  11. text_color(WHITE)
  12. for i = 0 to 255 do
  13.     if remainder(i, 8) = 0 then 
  14.     puts(SCREEN, '\n')
  15.     text_color(RED)
  16.     end if
  17.     if remainder(i, 16) = 0 then
  18.     puts(SCREEN, '\n')
  19.     text_color(WHITE)
  20.     end if
  21.     printf(SCREEN, "%3d: ", i)
  22.     if i = 0 then
  23.     puts(SCREEN, "NUL ")
  24.     elsif i = 9 then
  25.     puts(SCREEN, "TAB ")
  26.     elsif i = 10 then
  27.     puts(SCREEN, "LF  ")
  28.     elsif i = 13 then
  29.     puts(SCREEN, "CR  ")
  30.     else
  31.     puts(SCREEN, i)
  32.     puts(SCREEN, "   ")
  33.     end if
  34. end for
  35.  
  36. text_color(WHITE)
  37. puts(SCREEN, "\n\nPress Enter...")
  38. if atom(gets(0)) then
  39. end if
  40.  
  41. if graphics_mode(-1) then
  42. end if
  43.  
  44.